package com.woniuxy.java106crm.request;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseResult<T> {
    public static final ResponseResult OK = new ResponseResult(StateCode.SUCCESS,Message.SUCCESS);
    private Integer code;
    private String message;
    private T data;

    public ResponseResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public ResponseResult(ResponseResult result,T data) {
        this.code = result.getCode();
        this.message = result.getMessage();
        this.data = data;
    }

}
